﻿#include <iostream>
using namespace std;

class Date {
public:
    int GetMonthDay(int year, int month) {
        static int arr[32] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
        if (month == 2 && ((year % 100 != 0 && year % 4 == 0) ||
            (year % 400 == 0)))return 29;
        return arr[month];
    }
    Date(int year = 1900, int month = 1, int day = 1)
        : _year(year),
        _month(month),
        _day(day)
    {}
    Date(const Date& d) {
        _year = d._year;
        _month = d._month;
        _day = d._day;
    }
    Date& operator=(const Date& d) {
        _year = d._year;
        _month = d._month;
        _day = d._day;
        return *this;
    }
    Date& operator+=(int day) {
        if (day > 0) {
            _day += day;
            while (_day > GetMonthDay(_year, _month)) {
                _day -= GetMonthDay(_year, _month);
                _month++;
                if (_month == 13) {
                    _month = 1;
                    _year++;
                }
            }
            return *this;

        }
        else {
            return operator-=(-day);
        }
    }
    Date operator+(int day) {
        Date tmp = *this;
        tmp += day;
        return tmp;
    }
    Date operator-(int day) {
        Date tmp = *this;
        tmp -= day;
        return tmp;
    }
    Date& operator-=(int day) {
        if (day > 0) {
            _day -= day;
            while (_day < 0) {
                if (_month == 1) {
                    _month = 12;
                    _year--;
                }
                else _month--;
                _day += GetMonthDay(_year, _month);

            }
            return *this;
        }
        else {
            return operator+=(-day);
        }
    }
    bool operator==(const Date& d) {
        return _year == d._year && _month == d._month && _day == d._day;
    }
    friend ostream& operator<<(std::ostream& out, const Date& d) {
        out << d._year << '-' << d._month << '-' << d._day;
        return out;
    }
private:
    int _year;
    int _month;
    int _day;
};
int main() {
    Date d1(2020, 2, 20);
    d1 + -10;
    Date d2(d1 + 100);
    cout << d1 << endl;
    cout << d2 << endl;
    cout << (d1 == d2);
    return 0;
}
// 64 位输出请用 printf("%lld")
#if 0
#include<iostream>
#include<string>
#include<list>
#include<vector>
#include<queue>
#include<algorithm>
#include<assert.h>
using namespace std;

template<class T, class Container = std::vector<T>, class Compare = std::less<T>>
class PQueue
{
public:
    PQueue()
    {
        ;
    }
    template<class InputIterator>
    PQueue(InputIterator first, InputIterator last)
    {
        c.assign(first, last);
        make_heap(c.begin(), c.end(), Com);
    }
    bool empty()const
    {
        return c.empty();
    }
    size_t size()
    {
        return c.size();
    }
    const T& top()const
    {
        return c[0];
    }
    void push(const T& x)
    {
        c.push_back(x);
        AdjustUp(c.size() - 1);
    }
    void pop()
    {
        assert(!empty());
        swap(c[0], c[c.size() - 1]);
        c.pop_back();
        AdjustDown(0);
    }

    void AdjustUp(int child)
    {
        int parent = (child - 1) / 2;
        while (child > 0)
        {
            if (Com(c[parent], c[child]))
            {
                swap(c[parent], c[child]);
                child = parent;
                parent = (child - 1) / 2;
            }
            else
                break;
        }

    }
    void AdjustDown(int parent)
    {
        int child = parent * 2 + 1;
        while (child < c.size())
        {
            if (child + 1 < c.size() && Com(c[child], c[child + 1]))child++;
            if (Com(c[parent], c[child]))
            {
                swap(c[parent], c[child]);
                parent = child;
                child = parent * 2 + 1;
            }
            else
                break;
        }
    }

private:
    Container c;
    Compare Com;
};


int main() {
    PQueue<int>pq;
    pq.push(10);
    pq.push(20);
    pq.push(30);
    cout << pq.top();
    pq.pop();
    pq.pop();
    cout << pq.top();

}

int main()
{
    /*bool po = false;
    bool z = po |= true;
    z |= false;
    cout << z;*/
    /*less<int>a;
    cout<<a(1, 2);
    priority_queue<int> pq;
    for (int i = 0; i < 9; i++)
    {
        pq.push(i);
    }
    while (!pq.empty())
    {
        cout << pq.top()<<' ';
        pq.pop();
    }*/
    vector<int>a{ 1,2,3,4,5,6,7,8 };
    make_heap(a.begin(), a.end());
    for (auto c : a)
        cout << c << ' ';

    return 0;
}

int main()
{
    string a{ "ergerg" };
    string b;
    cout << a.find(b);
  
    return 0;
}

class Solution {
public:

    bool isValidSudoku(vector<vector<char>>& board) {
        bool row[9][10] = { false };
        bool col[9][10] = { false };
        bool grid[3][3][10] = { false };
        int size = board.size();
        for (int i = 0; i < size; i++)
            for (int j = 0; j < size; j++)
            {
                if (board[i][j] == '.')continue;
                int n = board[i][j] - 48;
                if (row[i][n] || col[j][n] || grid[i / 3][j / 3][n])return false;

                row[i][n] = col[j][n] = grid[i / 3][j / 3][n] = true;
            }
        return true;
    }
    bool dfs(vector<vector<char>>& board, int x, int y)
    {
        if (x == 9 && y == 8)return true;
        if (board[x][y] != '.')
        {
            if (y < 8)return dfs(board, x, y + 1);
            else return dfs(board, x + 1, 0);
        }

        for (char j = '1'; j != '9' + 1; j++)
        {
            board[x][y] = j;
            if (!isValidSudoku(board))
            {
                board[x][y] = '.';
                continue;
            }
            if (y == 8)
            {
                int a = 1;
            }
            bool flag;
            if (y < 8)flag = dfs(board, x, y + 1);
            else flag = dfs(board, x + 1, 0);

            if (!flag)
            {
                board[x][y] = '.';
                continue;
            }
            else return true;
        }
        return false;
    }
    void solveSudoku(vector<vector<char>>& board) {
        dfs(board, 0, 0);
    }
};

int main()
{
    vector < vector<char>>board = { {'5','3','.','.','7','.','.','.','.'},
                                    {'6','.','.','1','9','5','.','.','.'} ,
                                    {'.','9','8','.','.','.','.','6','.'} ,
                                    {'8','.','.','.','6','.','.','.','3'} ,
                                    {'4','.','.','8','.','3','.','.','1'} ,
                                    {'7','.','.','.','2','.','.','.','6'} ,
                                    {'.','6','.','.','.','.','2','8','.'} ,
                                    {'.','.','.','4','1','9','.','.','5'} ,
                                    {'.','.','.','.','8','.','.','7','9'} ,
    };
    Solution().solveSudoku(board);
    return 0;
}


class Solution {
public:
    
    bool isValidSudoku(vector<vector<char>>& board) {
        bool row[9][10];
        bool col[9][10];
        bool grid[3][3][10];
        int size = board.size();
        for (int i = 0; i < size; i++)
            for (int j = 0; j < size; j++)
            {
                if (board[i][j] == '.')continue;
                int n = board[i][j] - 48;
                if (row[i][n] || col[j][n] || grid[i / 3][j / 3][n])return false;              
           
                row[i][n] = col[j][n] = grid[i / 3][j / 3][n] = true;
            }
        return true;
    }
    bool dfs(vector<vector<char>>& board, int x, int y)
    {


        if (board[x][y] != '.')
        {
            if (y < 8)return dfs(board, x, y + 1);
            else return dfs(board, x + 1, y);
        }

        for (char j = '1'; j != '9' + 1; j++)
        {
            board[x][y] = j;
            if (j == '2')
            {
                int u = 0;
            }
            // if(board[0][3] == '1')return true;

            if (!isValidSudoku(board))continue;
            if (board[0][3] == '2')return true;
            bool flag;
            if (y < 8)flag = dfs(board, x, y + 1);
            else flag = dfs(board, x + 1, y);

            if (!flag)continue;
            else return true;
        }
        return false;
    }
    void solveSudoku(vector<vector<char>>& board) {
        dfs(board, 0, 0);
    }
};
int main()
{

    //string base;
    //cin >> base;
    //for (int i = 0; i < base.size(); i++)
    //{
    //    if (i == 0 || base[i + 1] == ' ')cout << toupper(base[i]);
    //}
    /*vector<int>v{ 2 ,4 ,8 ,10 ,11 };
    sort(v.begin(), v.end(),greater<int>());
    for (auto num : v)cout << num << ' ';*/
    cout << 50 + 51 + 103 + 105 + 52;

    return 0;
}

int main() {
    int n, k;
    cin >> n >> k;
    vector<int>arr1;
    vector<int>arr2;
    for (int i = 0; i < n; i++)
    {
        int num = 0;
        cin >> num;
        num % 2 == 0 ? arr2.push_back(num) : arr1.push_back(num);
    }
    sort(arr2.begin(), arr2.end());
    while (1)
    {
        int last = arr2.size();
        while (arr2[last - 1] > arr2[last - 2])
        {
            arr2[last - 1] /= 2;
            if (!k--)goto next;
        }
        sort(arr2.begin(), arr2.end());
    }
next:
    int ans = 0;
    for (auto num : arr2)ans += num;
    for (auto num : arr1)ans += num;
    cout << ans;
}
// 64 位输出请用 printf("%lld")

#include <cctype>
#include <iostream>
#include<string>
using namespace std;

int main()
{

    //string base;
    //cin >> base;
    //for (int i = 0; i < base.size(); i++)
    //{
    //    if (i == 0 || base[i + 1] == ' ')cout << toupper(base[i]);
    //}
    vector<int>v{ 2 ,4 ,8 ,10 ,11 };
    sort(v.begin(), v.end());
    for (auto num : v)cout << num << ' ';


    return 0;
}
// 64 位输出请用 printf("%lld")

int main()
{
    int n = 0, ans = -1;
    cin >> n;
    vector<string>arr(n);
    string str1, str2;
    cin >> str1 >> str2;
    for (int i = 0; i < n; i++)cin >> arr[i];
    auto pos1 = find(arr.begin(), arr.end(), str1);
    auto pos2 = find(arr.begin(), arr.end(), str2);
    while (pos1 != arr.end() && pos2 != arr.end())
    {
        if (pos2 < pos1)
        {
            swap(str1, str2);
            swap(pos1, pos2);
        }
        int tmp = abs(pos2 - pos1);
        if (ans > tmp || ans == -1)ans = tmp;
        pos1 = find(pos1 + 1, arr.end(), str1);
    }
    cout << ans;

    return 0;
}

int main()
{
    int n = 0, ans = -1;
    cin>>n;
    vector<string>arr(n);
    string str1, str2;
    cin >> str1 >> str2;
    for (int i = 0; i < n; i++)cin >> arr[i];
    auto pos1 = find(arr.begin(), arr.end(), str1);
    auto pos2 = find(arr.begin(), arr.end(), str2);
    while (pos1 != arr.end() && pos2 != arr.end())
    {
        if (pos2 < pos1)swap(str1, str2);
        ans = pos2 - pos1;
        pos1 = find(pos1 + 1, arr.end(), str1);
        if (pos1 == arr.end())break;
        if (ans > abs(pos2 - pos1))ans = abs(pos2 - pos1);
        pos2 = find(pos2 + 1, arr.end(), str2);
        if (pos2 == arr.end())break;
        if (ans > abs(pos2 - pos1))ans = abs(pos2 - pos1);
    }
    cout << ans;

    return 0;
}

using namespace std;
int main()
{
    string str1, str2;
    cin >> str1 >> str2;
    cout << str1 << endl;
    cout << str2 << endl;


    return 0;
}



class Solution {
public:
    vector<vector<int>>ans;
    vector<int>tmp;
    char arr[10];
    void dfs(vector<int>& nums, int n)
    {
        if (n == nums.size())return;
        for (int i = n; i < nums.size(); i++)
        {
            tmp.push_back(nums[n]);
            ans.push_back(tmp);
            dfs(nums, n + 1);
            tmp.pop_back();
        }
    }
    vector<vector<int>> subsets(vector<int>& nums) {

        dfs(nums, 0);
        return ans;
    }
};
int main()
{
    vector<int>v{ 1,2,3 };
    Solution().subsets(v);


    return 0;
}



int main()
{
    string a = to_string(12);
    string qa = "123456789";
    string b = "12freegtesgseg";
    auto s = search(a.begin(), a.end(), b.begin(), b.end());
    vector<bool>v(8,true);
    v.push_back(false);
    auto c = v.begin();
    return 0;
}
#include <stdio.h>

typedef struct {
    int year;
    int month;
    int day;
    int hour;
    int minute;
    int second;
}timestamp_t;

long long calculate_timestamp(const char* time)
{
    long long ret = 0;
    timestamp_t current_timestamp;
    ret = sscanf(time, "%d/%d/%d,%d:%d:%d",
        &current_timestamp.year,
        &current_timestamp.month,
        &current_timestamp.day,
        &current_timestamp.hour,
        &current_timestamp.minute,
        &current_timestamp.second);
    printf("time:%d,%d,%d,%d,%d,%d\r\n",
        current_timestamp.year,
        current_timestamp.month,
        current_timestamp.day,
        current_timestamp.hour,
        current_timestamp.minute,
        current_timestamp.second);

    if (0 >= (int)(current_timestamp.month -= 2)) {    /**//* 1..12 -> 11,12,1..10 */
        current_timestamp.month += 12;      /**//* Puts Feb last since it has leap day */
        current_timestamp.year -= 1;
    }
    ret = (long long)((((
        (unsigned long long) (current_timestamp.year / 4 - current_timestamp.year / 100 + current_timestamp.year / 400 + 367 * current_timestamp.month / 12 + current_timestamp.day) + current_timestamp.year * 365 - 719499
        ) * 24 + current_timestamp.hour /**//* now have hours */
        ) * 60 + current_timestamp.minute /**//* now have minutes */
        ) * 60 + current_timestamp.second /**//* now have seconds */
> --->-- - ) * 1000; /**//* finally milliseconds */
printf("timestamp:%lld\r\n", ret);
return ret;
}

void convert_timestamp_to_date(long long timestamp, char* buf) {
    int days, seconds, hours, minutes;
    long temp_days;
    int year = 1970;
    int month;

    // 添加东八区的时差
    timestamp += 8 * 3600 * 1000; // 将时间戳转换为东八区时间

    // 计算日期和时间
    days = (int)(timestamp / (86400000)); // 计算天数
    seconds = (int)((timestamp % (86400000)) / 1000); // 剩余秒数
    hours = seconds / 3600; // 小时数
    minutes = (seconds % 3600) / 60; // 分钟数
    seconds = seconds % 60; // 剩余秒数

    // 计算年份
    temp_days = days;
    while (temp_days >= (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) ? 366 : 365)) {
        temp_days -= (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) ? 366 : 365);
        year++;
    }

    // 计算月份和日期
    static const int days_in_month[2][12] = {
        {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
        {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
    };
    int leap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) ? 1 : 0;
    month = 0;
    while (temp_days >= days_in_month[leap][month]) {
        temp_days -= days_in_month[leap][month];
        month++;
    }
    int day = temp_days + 1;

    sprintf(buf, "%d/%02d/%02d,%02d:%02d:%02d", year, month + 1, day, hours, minutes, seconds);
    printf("buf:%s\r\n", buf);
}

int main() {
    const char time[] = "2024/04/15,09:02:39";
    long long timestamp = calculate_timestamp(time);
    char buf[30] = { 0 };
    convert_timestamp_to_date(timestamp, buf);
    return 0;
}
——————

class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}class A
{
public:
    void f() { cout << "A::f()" << endl; }
    int a = 0;
};



class B : public A
{
public:
    void f(int b = 1) {
        printf("%d", a);
    }
    int a = 1;
};
int main()
{
    B b;
    b.f();
    return 0;
}

/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode() : val(0), left(nullptr), right(nullptr) {}
 *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
 *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
 * };
 */
class Solution {
public:

    int _pruneTree(TreeNode* root)
    {
        if (!root)return 0;
        int l = _pruneTree(root->left);
        if (!l)root->left = nullptr;
        int r = _pruneTree(root->right);
        if (!r)root->right = nullptr;
        return root->val + l + r;
    }
    TreeNode* pruneTree(TreeNode* root)
    {
        root = _pruneTree(root) == 0 ? nullptr : root;
        return root;
    }
};
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode() : val(0), left(nullptr), right(nullptr) {}
 *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
 *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
 * };
 */
class Solution {
public:
    TreeNode* pruneTree(TreeNode* root)
    {
        if (!root)return nullptr;
        root->left = pruneTree(root->left);
        root->right = pruneTree(root->right);
        if (!root->left && !root->right && root->val == 0)return nullptr;
        return root;
    }
};
class Solution {
public:
    void _hanota(vector<int>& a, vector<int>& b, vector<int>& c, int n, int&i ) {
        if (n == 1)
        {
            c.push_back(a.back());
            a.pop_back();
            cout << ++i<<endl;
            return;
        }
        _hanota(a, c, b, n - 1,i);
        c.push_back(a.back());
        a.pop_back();
        cout << ++i<<endl;
        /*cout << n << endl;*/
        _hanota(b, a, c, n - 1,i);
    }

    void hanota(vector<int>& A, vector<int>& B, vector<int>& C) {
        int i = 0;
        _hanota(A, B, C, A.size(),i);
    }
};
int main()
{
    vector<int>a, b, c;
    for (int i = 64; i >= 1; i--)a.push_back(i);
    Solution().hanota(a, b, c);

    return 0;
}

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int n = nums.size() - 1;
        int l = 0, r = n;
        while (l < r)
        {
            int mid = ((r - l) >> 1) + l;
            if (target > nums[r])
            {
                r = mid;
                continue;
            }
            if (target < nums[l])
            {
                l = mid;
                continue;
            }
            if (nums[mid] < target)l = mid + 1;
            else r = mid;
        }
        // return l;
        return nums[l] == target ? l : -1;
    }
};

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int n = nums.size() - 1;
        int l = 0, r = n;
        while (l < r)
        {
            int mid = ((r - l) >> 1) + l;
            if (target > nums[r])
            {
                r = mid;
                continue;
            }
            if (target < nums[l])
            {
                l = mid;
                continue;
            }
            if (nums[mid] < target)l = mid + 1;
            else r = mid;
        }
        // return l;
        return nums[l] == target ? l : -1;
    }
};

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int n = nums.size() - 1;
        int l = 0, r = n;
        while (l < r)
        {
            int mid = ((r - l) >> 1) + l;
            if (target > nums[r])
            {
                r = mid;
                continue;
            }
            if (target < nums[l])
            {
                l = mid;
                continue;
            }
            if (nums[mid] < target)l = mid + 1;
            else r = mid;
        }
        // return l;
        return nums[l] == target ? l : -1;
    }
};

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int n = nums.size() - 1;
        int l = 0, r = n;
        while (l < r)
        {
            int mid = ((r - l) >> 1) + l;
            if (target > nums[r])
            {
                r = mid;
                continue;
            }
            if (target < nums[l])
            {
                l = mid;
                continue;
            }
            if (nums[mid] < target)l = mid + 1;
            else r = mid;
        }
        // return l;
        return nums[l] == target ? l : -1;
    }
};

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int n = nums.size() - 1;
        int l = 0, r = n;
        while (l < r)
        {
            int mid = ((r - l) >> 1) + l;
            if (target > nums[r])
            {
                r = mid;
                continue;
            }
            if (target < nums[l])
            {
                l = mid;
                continue;
            }
            if (nums[mid] < target)l = mid + 1;
            else r = mid;
        }
        // return l;
        return nums[l] == target ? l : -1;
    }
};

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int n = nums.size() - 1;
        int l = 0, r = n;
        while (l < r)
        {
            int mid = ((r - l) >> 1) + l;
            if (target > nums[r])
            {
                r = mid;
                continue;
            }
            if (target < nums[l])
            {
                l = mid;
                continue;
            }
            if (nums[mid] < target)l = mid + 1;
            else r = mid;
        }
        // return l;
        return nums[l] == target ? l : -1;
    }
};

int main()
{
    vector<int>v = { 4,5,6,7,0,1,2 };
    Solution().search(v, 3);

    return 0;
}

class Solution {
public:
    double myPow(double x, int n) {
        if (n == 0)return 1;
        long double num = x;
        int t = abs(n);
        int i;
        for (int i = 2; i < n; i = i * i)
        {
            num = num * num;
        }
        for (int j = 0; j < n - sqrt(i); j++)
        {
            num *= x;
        }

        if (n < 0)num = 1 / num;
        return num;
    }
};

int main()
{

    cout<<Solution().myPow(2, 10);

    return 0;
}


class Solution1 {
public:
    int judgeSquareSum(int c) {
        for (long long int i = 0; i <= sqrt(c); i++)
        {
            // int l = 0,r = sqrt(c);
            // while(l<r)
            // {
            //     int mid = ((r - l)>>1) + l;
            //     if(mid<c - i*i)l = mid + 1;
            //     else r = mid;
            // }
            for (int l = 0; l < sqrt(c); l++)
                if (l * l + i * i == c)return l;
        }
        return 0;
    }
};
class Solution {
public:
    bool judgeSquareSum(int c) {
        for (long long int i = 0; i <= sqrt(c); i++)
        {
            int l = 0, r = sqrt(c);
            if (i == 30)
            {
                int o = 1;
            }
            while (l < r)
            {
                int mid = ((r - l) >> 1) + l;
                if (mid < c - i * i)l = mid + 1;
                else r = mid;
            }
            // for(int l = 0;l<sqrt(c);l++)
            if (l * l + i * i == c)return l;
        }
        return false;
    }
};
int main()
{
    //cout<<Solution().judgeSquareSum(1000);
    //int r = sqrt(1000);
    //cout << r;
    cout << sqrt(11) * sqrt(11);
    return 0;
}


int main()
{

    cout << sqrt(INT_MAX) << endl;
    cout << sqrt(2147395600) << endl;
    cout << INT_MAX <<endl;
    cout << (unsigned int )46340 * 46340;
    return 0;
}


int main()
{
    queue<int>qu;
    qu.push(1);
    qu.push(2);
    qu.push(3);
    qu.push(4);
    return  0;
}


class Solution {
public:
    vector<string> letterCombinations(string digits) {
        vector<string> tmp(8);
        tmp[0] = "abc";
        tmp[1] = "def";
        tmp[2] = "ghi";
        tmp[3] = "jkl";
        tmp[4] = "mno";
        tmp[5] = "pqrs";
        tmp[6] = "tuv";
        tmp[7] = "wxyz";
        vector<string> ans(1, "");

        for (auto st : digits)
        {
            string s = tmp[st - '0' - 2];
            int t = ans.size();
            while (t--)
            {
                for (auto ch : s)
                {
                    ans.push_back(ans[0] + ch);
                }
                ans.erase(ans.begin());
            }
        }
        return ans;
    }
};

int main()
{
    vector<string>v = Solution().letterCombinations("242");
    for (auto st : v)
        cout << st << endl;

    return 0;
}

#endif // 0
